home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-178.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  42.6 KB  |  1,246 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Tue, 06 Oct 92       Volume 1 : Issue 178
  2.  
  3. Today's Topics:
  4.  
  5.     Best text compression
  6.     Adding Balloon help to my App...
  7.     Projects to be converted in Think Pascal.
  8.     Popup menus (help!!)
  9.     Open file at launch time?
  10.     Event Loop
  11.     little sys 7 pop up problem (popupMenuCDEFProc)
  12.     TN 306 GetIconSuite glue fatal error
  13.     Shareware Legality - Summary
  14.     Can TCL project size be reduced using precompiled headers?
  15.  
  16.  
  17.  
  18. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  19.  
  20. The digest is a collection of article threads from the internet newsgroup
  21. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  22. regularly and want an archive of the discussions.  If you don't know what a
  23. newsgroup is, you probably don't have access to it.  Ask your systems
  24. administrator(s) for details.  (This means you can't post questions to the
  25. digest.)
  26.  
  27. Each issue of the digest contains one or more sets of articles (called
  28. threads), with each set corresponding to a 'discussion' of a particular
  29. subject.  The articles are not edited; all articles included in this digest
  30. are in their original posted form (as received by our news server at
  31. cs.uoregon.edu).  Article threads are not added to the digest until the last
  32. article added to the thread is at least one month old (this is to ensure that
  33. the thread is dead before adding it to the digest).  Article threads that
  34. consist of only one message are generally not included in the digest.
  35.  
  36. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  37. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  38. file /pub/mac/csmp-digest/README before downloading any files.  The most
  39. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  40. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  41. archive has a mail server; send a message with the text '$MACarch help' (no
  42. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  43.  
  44. The digest is also available via email.  Just send a note saying that you
  45. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  46. automatically receive each new issue as it is created.  Sorry, back issues
  47. are not available through the mailing list.
  48.  
  49. Send administrative mail to mkelly@cs.uoregon.edu.
  50.  
  51.  
  52. -------------------------------------------------------
  53.  
  54. From: dawson@cs.cornell.edu (Dawson Dean)
  55. Subject: Best text compression
  56. Date: 4 Sep 92 15:02:16 GMT
  57. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  58.  
  59.  
  60. I sent a message to the original poster last night, but it must
  61. have bounced cuz I havent seen it on the net. Then, I see
  62. everyone saying how swell Huffman is and I've got to put in
  63. my own 2 cents. Its been my experience that a good lzw implementation
  64. blows away Huffman and the best public domain lzw I know of is 
  65. built by Ross Williams, and is called lzrw. There are 5 versions
  66. that have different speed/compression tradeoffs, but all are great.
  67.  
  68. You can ftp these from sirius.ucs.adelaide.edu.au or check archie
  69. for other archives. Plus, check out comp.compression and
  70. comp.compression.research, for the latest scoop from many people
  71. (including Ross Williams) who know lots more about this stuff
  72. than me.
  73.  
  74. Here is the readMe from the lzrw release....
  75. - ----------------
  76. DATA COMPRESSION DIRECTORY
  77. ==========================
  78. Date   : 04-Apr-1992.
  79. Author : Ross Williams (ross@spam.ua.oz.au)
  80.  
  81. This file gives an overview of the data compression directory of the
  82. anonymous ftp archive located at the University of Adelaide, South
  83. Australia. The exact location of the directory is:
  84.  
  85.    Machine   : sirius.itd.adelaide.edu.au    [IP=129.127.40.3]
  86.    Directory : pub/compression
  87.  
  88. The directory mostly contains public domain data compression
  89. algorithms developed by Ross Williams during early 1991. It also
  90. contains one or two other items of interest.
  91.  
  92. The files in this directory may be compressed. Files that are
  93. compressed will have names terminating with ".Z" and will have to be
  94. uncompressed before use (using the Unix "uncompress" command). I
  95. wouldn't trust my files to a data compression algorithm :-), but the
  96. system programmer who put the files there for me (I do not have direct
  97. control over this archive) seems to think that it is a good idea.
  98.  
  99. Ross Williams
  100. 21-Aug-1991
  101.  
  102. 0readme         - This descriptive file.
  103. dc_stan_just    - Justification of dc_stan_spec.
  104. dc_stan_spec    - Proposal for data compression interface standard.
  105. dc_stan_stream  - Revised proposed standard.
  106. dcc91_report    - Report on 1991 Data Compression Conference.
  107. fast_copy.68000 - Fast block move routine for 68000 microprocessor.
  108. lzrw1-a.68000   - LZRW1-A algorithm implemented in 68000 assembler.
  109. lzrw1-a.c       - LZRW1-A algorithm implemented in C
  110. lzrw1-a.txt     - Release notes for LZRW1-A algorithm.
  111. lzrw1.68000     - LZRW1 algorithm implemented in 68000 assembler.
  112. lzrw1.c         - LZRW1 algorithm implemented in C.
  113. lzrw1.tex       - DCC91 conference paper describing LZRW1 algorithm.
  114. lzrw2.c         - LZRW2 algorithm implemented in C.
  115. lzrw2.txt       - Release notes for LZRW2 algorithm.
  116. lzrw3-a.c       - LZRW3-A algorithm implemented in C.
  117. lzrw3-a.txt     - Release notes for LZRW3-A algorithm.
  118. lzrw3.c         - LZRW3 algorithm implemented in C.
  119. lzrw3.txt       - Release notes for LZRW3 algorithm.
  120. lzrw4.txt       - Description of LZRW4 algorithm (not yet implemented).
  121. lzrw45_covering - Release notes for LZRW4 and LZRW5 descriptions.
  122. lzrw5.txt       - Description of LZRW5 algorithm (not yet implemented).
  123. lzrw_headers.h  - Header files (.h files) for C code.
  124. puzzlebox_provpatent - Provisional patent for puzzle box.
  125. rw_info         - Information about Ross Williams and his activities.
  126.  
  127. WARNING: A patent has recently arisen that may cover one or more of
  128. these algorithms. Please refer to the file rw_info for more
  129. information.
  130.  
  131. - --<End of 0readme file for the compression directory>
  132. - -- 
  133. ******************************************************************
  134. Dawson Dean                       Internet: dawson@cs.cornell.edu
  135. Dept. of Computer Science         Office:   (607) 255-1179
  136. Cornell University
  137.  
  138. ---------------------------
  139.  
  140. From: danny@utkux1.utk.edu (Danny W. McCampbell)
  141. Subject: Adding Balloon help to my App...
  142. Date: 2 Sep 92 13:26:11 GMT
  143. Organization: University of Tennessee
  144.  
  145. Is there an easy way to add balloon help to my Application.
  146. I ready IM Vol VI and understand the resources, but when
  147. I create the resources in resedit I get the hex editor.
  148. Can anyone give me any tips on how to get started?
  149.  
  150. Thanks a bunch.
  151.  
  152. Danny McCampbell
  153. danny@utkux1.utk.edu
  154.  
  155. +++++++++++++++++++++++++++
  156.  
  157. From: cheshire@cs.stanford.edu (Stuart Cheshire)
  158. Date: 2 Sep 92 17:35:38 GMT
  159. Organization: Stanford University
  160.  
  161. In article <1992Sep2.132611.23290@utkux1.utk.edu> Danny W. McCampbell,
  162. danny@utkux1.utk.edu writes:
  163. >Is there an easy way to add balloon help to my Application.
  164.  
  165. I do my Balloon help by reading IMVI and using SaRez which comes with
  166. Think C.
  167.  
  168. However, a friend showed me Resorcerer, and it is brilliant (in many
  169. respects, not just that of its handling of Balloon help resources). If
  170. you can afford it, I would recommend that you buy it. I intend to as soon
  171. as I can.
  172.  
  173. Stuart Cheshire <cheshire@cs.stanford.edu>
  174.  * Liliore Green Rains Houses Resident Computer Coordinator
  175.  * Stanford Distributed Systems Group Research Assistant
  176.  * Macintosh Programmer
  177.  
  178. +++++++++++++++++++++++++++
  179.  
  180. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  181. Organization: NCRPDA, Curtin University
  182. Date: Thu, 3 Sep 1992 05:13:30 GMT
  183.  
  184. In article <1992Sep2.132611.23290@utkux1.utk.edu>, danny@utkux1.utk.edu
  185. (Danny W. McCampbell) wrote:
  186. > Is there an easy way to add balloon help to my Application.
  187. > I ready IM Vol VI and understand the resources, but when
  188. > I create the resources in resedit I get the hex editor.
  189. > Can anyone give me any tips on how to get started?
  190.  
  191. Whatever you do, don't use BalloonWriter or you'll spend more time fighting
  192. it than adding balloons!  The best way I've found is to use ResEdit to
  193. create the dialog, and then set the DITL resource's Balloon Help to
  194. HMscanhdlg, ID <whatever>, and then use SARez, and life is relatively
  195. simple.  Here's an example rez source:
  196.  
  197. #include "Types.r"
  198. #include "BalloonTypes.r"
  199.  
  200. resource 'hdlg' (1002, "DITL 202") {
  201.     2,
  202.     0,
  203.     0,
  204.     0,
  205.     0,
  206.     HMSkipItem {
  207.  
  208.     },
  209.     {    /* array HDialogArray: 10 elements */
  210.         /* [1] */
  211.         HMStringResItem {
  212.             {0, 0},
  213.             {0, 0, 0, 0},
  214.             1002,
  215.             1,
  216.             0,
  217.             0,
  218.             0,
  219.             0,
  220.             0,
  221.             0
  222.         },
  223.         /* [2] */
  224.         HMStringResItem {
  225.             {0, 0},
  226.             {0, 0, 0, 0},
  227.             1002,
  228.             2,
  229.             0,
  230.             0,
  231.             0,
  232.             0,
  233.             0,
  234.             0
  235.         },
  236.         /* [3] */
  237.         HMStringResItem {
  238.             {0, 0},
  239.             {0, 0, 0, 0},
  240.             1002,
  241.             3,
  242.             0,
  243.             0,
  244.             0,
  245.             0,
  246.             0,
  247.             0
  248.         },
  249.         /* [4] */
  250.         HMSkipItem {
  251.  
  252.         },
  253.         /* [5] */
  254.         HMStringResItem {
  255.             {0, 0},
  256.             {0, 0, 0, 0},
  257.             1002,
  258.             4,
  259.             0,
  260.             0,
  261.             0,
  262.             0,
  263.             0,
  264.             0
  265.         },
  266.         /* [6] */
  267.         HMStringResItem {
  268.             {0, 0},
  269.             {0, 0, 0, 0},
  270.             0,
  271.             0,
  272.             0,
  273.             0,
  274.             1002,
  275.             5,
  276.             1002,
  277.             5
  278.         },
  279.         /* [7] */
  280.         HMStringResItem {
  281.             {0, 0},
  282.             {0, 0, 0, 0},
  283.             1002,
  284.             6,
  285.             0,
  286.             0,
  287.             0,
  288.             0,
  289.             0,
  290.             0
  291.         },
  292.         /* [8] */
  293.         HMStringResItem {
  294.             {0, 0},
  295.             {0, 0, 0, 0},
  296.             1002,
  297.             7,
  298.             0,
  299.             0,
  300.             0,
  301.             0,
  302.             0,
  303.             0
  304.         },
  305.         /* [9] */
  306.         HMStringResItem {
  307.             {0, 0},
  308.             {0, 0, 0, 0},
  309.             1002,
  310.             8,
  311.             0,
  312.             0,
  313.             0,
  314.             0,
  315.             0,
  316.             0
  317.         },
  318.         /* [10] */
  319.         HMStringResItem {
  320.             {0, 0},
  321.             {0, 0, 0, 0},
  322.             1002,
  323.             9,
  324.             0,
  325.             0,
  326.             0,
  327.             0,
  328.             0,
  329.             0
  330.         }
  331.     }
  332. };
  333.  
  334. resource 'STR#' (1002, "BH for hmnu 202") {
  335.     {    /* array StringArray: 4 elements */
  336.         /* [1] */
  337.         "Click here to save the changes that you "
  338.         "have made.  The changes will take effect"
  339.         " for all future logins.",
  340.         /* [2] */
  341.         "Click here if you don't want to make any"
  342.         " changes.",
  343.         /* [3] */
  344.         "Click here if you make a mistake and wis"
  345.         "h to discard all the changes you have ma"
  346.         "de.",
  347.         /* [4] */
  348.         "Type in the default directory here.  Thi"
  349.         "s is the directory a user will start in "
  350.         "if they are not explicitly listed in the"
  351.         " menu below.",
  352.         /* [5] */
  353.         "Select a user with this menu, and then e"
  354.         "dit their username and/or their startup "
  355.         "directory.",
  356.         /* [6] */
  357.         "Click here if you wish to create a new u"
  358.  
  359. +++++++++++++++++++++++++++
  360.  
  361. From: franke@llnl.gov (Norman Franke, III)
  362. Date: 4 Sep 92 17:21:35 GMT
  363. Organization: Lawrence Livermore National Laboratory
  364.  
  365. In article <1992Sep3.184230.2332@alias.com> Reid Ellis, rae@Alias.com
  366. writes:
  367. >This is fine as long as your balloon help strings are all less than
  368. >255 chars long.  If they're longer, you should use TEXT [HMTEResItem]
  369. >resources instead.  Another advantage of using TEXT resources is that
  370.  
  371. I read in the recent copy of _d e v e l o p_ that the Help Manager will
  372. only
  373. use 255 length strings maximum, whether from TEXT & styl or from a STR or
  374. STR#.
  375. They suggested using a PICT for anything larger.
  376.  
  377. | | | |   +----------------------------------------+
  378. | | | |   | Lawrence Livermore National Laboratory |
  379. | | | |__ |        Computer Scientist - EPD        |
  380. | | |___/ |     T-5475, R-1321, (510) 422-7440     |
  381. \ \____/  | Norman Franke, III - frankee@.llnl.gov |
  382.  \____/   -----------------------------------------+
  383.  
  384. ---------------------------
  385.  
  386. From: rudim@cs.kuleuven.ac.be (Rudi Maelbrancke)
  387. Subject: Projects to be converted in Think Pascal.
  388. Organization: Dept. Computerwetenschappen K.U.Leuven
  389. Date: Thu, 3 Sep 1992 14:09:57 GMT
  390.  
  391. Hello,
  392.  
  393. I have a problem opening some example projects which are accompaning 
  394. plug in cards for Macintosh.
  395.  
  396. When I open the projects, I get a message saying: The project name has to be
  397. converted (compressed) before proceeding...
  398.  
  399. When I click OK the file is enlarged but seems to contain no files.
  400. (No references in the project).
  401.  
  402. Does anybody knows what a compressed or converted project means?
  403.  
  404. I'm using system 7.0 and still THINK Pascal 3.0
  405.  
  406. Rudi Maelbrancke,
  407.  
  408. Please E-mail me.
  409.  
  410. Rudi.Maelbrancke@cs.kuleuven.ac.be
  411.  
  412. Thank you!
  413.  
  414.  
  415.  
  416. +++++++++++++++++++++++++++
  417.  
  418. From: siegel@world.std.com (Rich Siegel)
  419. Organization: GCC Technologies
  420. Date: Thu, 3 Sep 1992 17:32:25 GMT
  421.  
  422. In article <1992Sep3.140957.10623@cs.kuleuven.ac.be> rudim@cs.kuleuven.ac.be (Rudi Maelbrancke) writes:
  423. >
  424. >When I open the projects, I get a message saying: The project name has to be
  425. >converted (compressed) before proceeding...
  426. >
  427. >When I click OK the file is enlarged but seems to contain no files.
  428. >(No references in the project).
  429.  
  430. The probable cause of this is that the project documents were created by
  431. THINK Pascal 4.0, and you're trying to open them with THINK Pascal 3.0.
  432. You can either update to THINK Pascal 4.0, or get your vendor to send
  433. you the projects in 3.0 format, or guess and try to figure out what
  434. files (besides runtime.lib and interface.lib) were in the example
  435. projects.
  436.  
  437. R>
  438. - -- 
  439. - -----------------------------------------------------------------------
  440. Rich Siegel                              Internet: siegel@world.std.com
  441. Software Engineer & Toolsmith
  442. GCC Technologies
  443.  
  444. ---------------------------
  445.  
  446. From: bberqu@sagpd1 ()
  447. Subject: Popup menus (help!!)
  448. Date: Mon, 31 Aug 1992 17:32:44 GMT
  449.  
  450.  
  451. Hi,
  452.  
  453. I have three popup menus within a dialog box and am trying to figure out
  454. the best way to handle them, I know system 7 has support for them, but 
  455. I would like my application to work with earlier versions of the OS also.
  456.  
  457. Here's how I'm doing it, I create the static text to the side of the 
  458. popupmenu with ResEdit (using DITL/DLOG editor), and also the popup menus
  459. (with the Menu editor).  Since I don't know the width of the menus in 
  460. ResEdit to make boxes for the popupmenus to the right of the static text 
  461. as user Items, I calculate in my program based on where the static text 
  462. item's rect is and the width of the popup menu, the rectangle for the popupmenu.
  463. I also create a control for the popup menu for that rectangle and store
  464. the menuhandle in the control's refcon field.  Everything works fine up to 
  465. this point, handling them is another story.
  466.  
  467. It seems like all I should have to do to handle popup menus is when 
  468. ModalDialog detects an event within the dialog it should pass the 
  469. information to my filterProc function. If I know where the event happened 
  470. and the dialog pointer I could call FindControl which would return me the 
  471. control, and I've previously stored the menu handle in the control refcon 
  472. field, so then I could simply call PopMenuSelect with the controls rect 
  473. and the menuhandle, however I don't, understand CDEFs so FindControl 
  474. doesn't seem to be returning the control handle, also ModalDialog does not 
  475. seem to be passing me the dialog pointer (should it be?).  I suspect 
  476. FindControl is not finding the control because of my CDEF (it doesn't do
  477. anything right now but return 1).  I know very little about CDEFs, IM 
  478. doesn't seem to explain them very well (at least I don't understand them), 
  479. I looked for information on them in bookstores over the weekend, but 
  480. with no luck.  
  481.  
  482. Am I on the right track or totally off base.  If I'm on the right track, 
  483. could somebody please explain CDEFs or point me to a good book on the 
  484. subject and if ModalDialog will give me the information I need to do this.
  485. I also don't understand how ModalDialog works either, but somebody explained 
  486. at least how the ModalDialog and filterProc functions work together.
  487. If I'm off base, please give me some info on how you would do it.
  488.  
  489. Thanks in advance, sorry for the long mail and hope its understandable.
  490.  
  491. Brian
  492.  
  493. +++++++++++++++++++++++++++
  494.  
  495. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  496. Organization: University of Illinois at Urbana
  497. Date: Mon, 31 Aug 1992 23:24:09 GMT
  498.  
  499. bberqu@sagpd1 () writes:
  500.  
  501. >I have three popup menus within a dialog box and am trying to figure out
  502. >the best way to handle them, I know system 7 has support for them, but 
  503. >I would like my application to work with earlier versions of the OS also.
  504.  
  505. Suggestion 1: use the pop-up menu CDEF included with the System 6
  506. Communications Toolbox for pre-System 7 machines.
  507.  
  508. >It seems like all I should have to do to handle popup menus is when 
  509. >ModalDialog detects an event within the dialog it should pass the 
  510. >information to my filterProc function. If I know where the event happened 
  511. >and the dialog pointer I could call FindControl which would return me the 
  512. >control....
  513.  
  514. More likely, you want to call FindDItem, not FindControl.
  515.  
  516. pr
  517. - -- 
  518. Pete Resnick             (...so what is a mojo, and why would one be rising?)
  519. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  520. System manager - Cognitive Science Group, Beckman Institute, UIUC
  521. Internet: resnick@cogsci.uiuc.edu
  522.  
  523. +++++++++++++++++++++++++++
  524.  
  525. From: haynes@mace.cc.purdue.edu (Carl W. Haynes III)
  526. Date: 1 Sep 92 03:04:59 GMT
  527. Organization: Purdue University
  528.  
  529. In article <BtvFoB.L5J@news.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  530. >
  531. >Suggestion 1: use the pop-up menu CDEF included with the System 6
  532. >Communications Toolbox for pre-System 7 machines.
  533. >
  534.  
  535. What's the licensing deal with this? Do we need to license the CDEF from
  536. Apple if we use it in our programs for pre-system 7 work?
  537. I ended up writing my own, but may be interested in using Apple's instead.
  538.  
  539. carl
  540.  
  541. - --
  542. Carl W. Haynes III  
  543. Haynes Consulting Services        ||  CWH3@aol.com
  544. PO Box 2715                       ||  haynes@mace.cc.purdue.edu
  545. W. Lafayette, IN 47906            ||  hcs@applelink.apple.com
  546. - ----------------------------------------------------------------------
  547.        Macintosh Programming & Consulting - Yes, I'm available
  548.  
  549. +++++++++++++++++++++++++++
  550.  
  551. From: sdorner@qualcomm.com (Steven Dorner)
  552. Organization: Qualcomm, Inc
  553. Date: Tue, 1 Sep 1992 14:40:26 GMT
  554.  
  555. haynes@mace.cc.purdue.edu (Carl W. Haynes III) wrote:
  556. >resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  557. > >
  558. > >Suggestion 1: use the pop-up menu CDEF included with the System 6
  559. > >Communications Toolbox for pre-System 7 machines.
  560. > >
  561. > What's the licensing deal with this? Do we need to license the CDEF from
  562. > Apple if we use it in our programs for pre-system 7 work?
  563.  
  564. I would assume you would have to pay the fee for redistributing the Comm
  565. Toolbox.  This is $50 per year.  Ask sw.license@applelink.apple.com to
  566. be sure.
  567.  
  568. It's a real shame this CDEF didn't get rolled into System 6.  The CTB
  569. has been around since 6.0.4 or so, so it could have been done with the
  570. release of 6.0.5 or 6.0.7.
  571.  
  572. The problem with shipping your own copy of the CDEF is that you must
  573. renumber it, or it will interfere with the system 7 popup CDEF.  Then you
  574. either have to use your renumbered CDEF under system 7, or you have to
  575. change your controls on the fly to pick up the sys7 CDEF.
  576.  
  577. +++++++++++++++++++++++++++
  578.  
  579. From: sw@network-analysis-ltd.co.uk (Sak Wathanasin)
  580. Date: 4 Sep 92 14:17:40 GMT
  581. Organization: Network Analysis Ltd
  582.  
  583.  
  584. In article <sdorner-010992093127@dorner.slip.uiuc.edu> (comp.sys.mac.programmer), sdorner@qualcomm.com (Steven Dorner) writes:
  585.  
  586. > haynes@mace.cc.purdue.edu (Carl W. Haynes III) wrote:
  587. > > 
  588. > >resnick@cogsci.uiuc.edu (Pete Resnick) writes:
  589. > > >
  590. > > >Suggestion 1: use the pop-up menu CDEF included with the System 6
  591. > > >Communications Toolbox for pre-System 7 machines.
  592. > > >
  593. > > 
  594. > > What's the licensing deal with this? Do we need to license the CDEF from
  595. > > Apple if we use it in our programs for pre-system 7 work?
  596. > I would assume you would have to pay the fee for redistributing the Comm
  597. > Toolbox.  This is $50 per year.  Ask sw.license@applelink.apple.com to
  598. > be sure.
  599.  
  600. There is a copy of the popup CDEF in the MacApp 3.0 distribution. There is
  601. a brief reference to it in the release notes, and UPopup.h contains the
  602. following instruction:
  603.  
  604. // For Sys 6.0 support: include the Popup CDEF in the resource fork of your application
  605. // with the following lines in your app.r file:
  606. //        include "Popup.rsrc";
  607.  
  608. I assume, therefore, that the MacApp object code distribution licence covers
  609. the use of the CDEF.
  610.  
  611.  
  612. Sak Wathanasin
  613. Network Analysis Limited
  614. 178 Wainbody Ave South, Coventry CV3 6BX, UK
  615.  
  616. uucp:      ...!uknet!nan!sw  Phone: (+44) 203 419996
  617. AppleLink: NAN.LTD           Internet: sw@network-analysis-ltd.co.uk
  618.  
  619. ---------------------------
  620.  
  621. From: hd12@ellis.uchicago.edu (hui  dong)
  622. Subject: Open file at launch time?
  623. Date: 31 Aug 92 07:05:51 GMT
  624. Organization: University of Chicago Computing Organizations
  625.  
  626. I created an application, it can write files. I like to know if one double
  627. click on a file, the application is launched, but how can the application know
  628. and open the file automatically after the launched is finished.
  629.  
  630. +++++++++++++++++++++++++++
  631.  
  632. From: tague@omphalos.bug.co.jp (Tague Griffith )
  633. Date: 31 Aug 92 11:33:32 GMT
  634. Organization: BUG, Inc.   Sapporo, Japan
  635.  
  636. Subject says it all.
  637.  
  638. Under system 7.0, when your application is opened, the finder first sends the
  639. application an kAEOpenApplication ('oapp')  apple event.  Your application 
  640. should respond by doing anything it needs to do at startup.  Then the finder
  641. sends your application an kAEOpenDocuments 'odoc' event which includes a list
  642. of alias records to the double clicked files, resolve the aliases and then
  643. open the files.  Pretty much the same thing with the print document event as
  644. well.
  645.  
  646. Under system 6.0.x you can use the CountAppFiles, GetAppFiles, and ClrAppFiles
  647. procedures to handle this.  Your application really should support both 
  648. methods, since system 6.0.x is still the latest version of the os in many
  649. languages.  The Apple Event stuff is documented in IM VI (including example
  650. code) and the *AppFiles routines in IM II.  Plus, I think the 
  651. comp.sys.mac.programmer faq.----------------------------------------------------------------------------
  652. internet : tague@bug.co.jp         |  $@%S!<!&%f!<!&%8!<;%KZF|K\$G$9(J
  653.          : tague@cs.stanford.edu   |  $@%9%?%s%U%)%I!<Bg3X%"%a%j%+$G$9(J
  654. AppleLink: BUGPLAN.DVJ             |  BUG, Sapporo Japan (ISDN Development)
  655. "A result is a neutralisation ov, and challenge to, thee centre ov Control.
  656. A Tribal State replacing a State ov tribe." - G.P-Orridge, Psychic TV
  657. - ----------------------------------------------------------------------------
  658.  
  659. +++++++++++++++++++++++++++
  660.  
  661. From: chuck@gte.com (Chuck Hoffman)
  662. Date: 31 Aug 92 15:12:40 GMT
  663. Organization: GTE Laboratories
  664.  
  665. In article <5575@omphalos.bug.co.jp>, tague@omphalos.bug.co.jp (Tague
  666. Griffith ) wrote:
  667. > Under system 6.0.x you can use the CountAppFiles, GetAppFiles, and ClrAppFiles
  668. > procedures to handle this.  Your application really should support both 
  669. > methods, since system 6.0.x is still the latest version of the os in many
  670. > languages.  The Apple Event stuff is documented in IM VI (including example
  671. > code) and the *AppFiles routines in IM II.  Plus, I think the 
  672. > comp.sys.mac.programmer 
  673.  
  674. This is also true under System 7.  I have a sample application which
  675. happens to have this code in it.  It also has code for printing from the
  676. Finder as well as opening.  If you are interested, I would be happy to mail
  677. it to a postal address.
  678.  
  679. Chuck Hoffman
  680. chuck@gte.com
  681. GTE Laboratories, Waltham, Massachusetts, USA
  682. (617) 466-2131
  683. =====================================
  684. I'm not sure why we're here, but I am sure that while we're here we're
  685. supposed to help each other.
  686. =====================================
  687.  
  688. +++++++++++++++++++++++++++
  689.  
  690. From: greeny@top.cis.syr.edu (J. S. Greenfield)
  691. Organization: Syracuse University, CIS Dept.
  692. Date: Tue, 1 Sep 92 22:56:52 EDT
  693.  
  694. In article <5575@omphalos.bug.co.jp> tague@omphalos.bug.co.jp (Tague Griffith ) writes:
  695. >
  696. >Under system 7.0, when your application is opened, the finder first sends the
  697. >application an kAEOpenApplication ('oapp')  apple event.  Your application 
  698. >should respond by doing anything it needs to do at startup.  Then the finder
  699. >sends your application an kAEOpenDocuments 'odoc' event which includes a list
  700. >of alias records to the double clicked files, resolve the aliases and then
  701. >open the files.  Pretty much the same thing with the print document event as
  702. >well.
  703.  
  704. Actually, under any normal circumstances, the finder will *either* send
  705. an "oapp" or an "odoc" but *not* both.  (That is, immediately after launching.)
  706.  
  707. If you get an "oapp" it means that your application was launched *without*
  708. any documents--and you should take any appropriate action--for example,
  709. opening a new, untitled window.
  710.  
  711. If you get an "odoc" it means that your application was launched *with*
  712. documents (those listed in the "odoc" event).
  713.  
  714. If you were to get *both*, it would (normally) indicate that the application
  715. was first launched without any documents, and then a document was launched
  716. (double-clicked, or dropped on the app, for example) *after* the app was
  717. already running.
  718.  
  719.  
  720. - -- 
  721. J. S. Greenfield                                         greeny@top.cis.syr.edu
  722. (I like to put 'greeny' here, 
  723. but my d*mn system wants a 
  724. *real* name!)                        "What's the difference between an orange?"
  725.  
  726. +++++++++++++++++++++++++++
  727.  
  728. From: Anders Wallgren <anders@verity.com>
  729. Organization: Verity, Inc., Mountain View, CA, USA
  730. Date: Thu, 3 Sep 92 22:03:03 GMT
  731.  
  732. In article <1992Sep1.225652.21499@newstand.syr.edu> J. S.
  733. Greenfield, greeny@top.cis.syr.edu writes:
  734. >Actually, under any normal circumstances, the finder will *either*
  735. send
  736. >an "oapp" or an "odoc" but *not* both.  (That is, immediately
  737. after launching.)
  738.  
  739. Don't forget 'pdoc' - you will get either 'oapp', 'odoc', or 'pdoc'
  740. (and sometimes 'quit' shortly thereafter), under 'normal'
  741. conditions - this isn't enforced by anything, so be prepared for
  742. other sequences to happen.
  743.  
  744. anders
  745.  
  746. ---------------------------
  747.  
  748. From: rjr@titan.ucc.umass.edu (Richard J. Resnick)
  749. Subject: Event Loop
  750. Organization: University of Massachusetts, Amherst
  751. Date: Tue, 1 Sep 1992 15:27:20 GMT
  752.  
  753. Hello,
  754.  
  755. I don't know if it is "ok" protocol to post code questions here... I apologize
  756. in advance for any annoyance I may create. I did check the faq, and it wasn't
  757. any help. 
  758.  
  759. I am a beginning MAC programmer, and am working with the event loop thingy.
  760. I am trying to write a simple program which brings up the text window, and
  761. then just runs through the event loop until you click on the menu bar. But when
  762. I run it, it just hangs on me, and the debugger says that isEvent is _never_
  763. true! Will someone enlighten me as to why this code doesn't work? Thanks in 
  764. advance.
  765.  
  766. begin
  767.  
  768.   repeat
  769.     isEvent := GetNextEvent(everyEvent, thisEvent);
  770.  
  771.     case thisEvent.what of
  772.         nullEvent: {Do nothing} 
  773.            begin
  774.            end;
  775.         mouseDown: {where is the mouse clicked?}
  776.            begin
  777.               whereIsIt := FindWindow(thisEvent.where, thisWindow);
  778.  
  779.               case whereisIT of
  780.                   0, 3: {In drawing window}
  781.                      gameOver := false;
  782.                   1: {in Menubar}
  783.                      gameOver := true;
  784.               end; {case whereIsit}
  785.  
  786.            end; {mouseDown}
  787.  
  788.         otherwise:
  789.            begin
  790.            end;
  791.  
  792.     end; {case thisEvent.What}
  793.   until gameOver;
  794.  
  795. end.
  796.  
  797. *=====/=== ===^=====.==='========`============/==== = ^========~====/====^ =-=*
  798. *        "I'll return your fire, if you take away your vultures..."           *
  799. *                       - Prometheus, gaining leverage                        *
  800. *===^==/=======\======= ===`====='===> ==========>====.===== =^=====/====*====*
  801.                   Internet Address: rjr@titan.ucc.umass.edu
  802.  
  803.  
  804.  
  805.  
  806. +++++++++++++++++++++++++++
  807.  
  808. From: andrewt@scrooge.cs.wisc.edu (Andrew Thomas-cramer)
  809. Date: 3 Sep 92 17:47:32 GMT
  810. Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
  811.  
  812. isEvent is always 0, fortunately -- but it is not FALSE. GetNextEvent
  813. returns zero (noErr) unless an error occurs. You're confusing noErr
  814. with FALSE, both of which are equal to zero.
  815.  
  816. +++++++++++++++++++++++++++
  817.  
  818. From: zben@ni.umd.edu (Charles B. Cranston)
  819. Date: 3 Sep 92 18:54:19 GMT
  820. Organization: UM Home for the Terminally Analytical
  821.  
  822. In article <1992Sep3.174732.9231@cs.wisc.edu>,
  823. andrewt@scrooge.cs.wisc.edu (Andrew Thomas-cramer) wrote:
  824.  
  825. > isEvent is always 0, fortunately -- but it is not FALSE. GetNextEvent
  826. > returns zero (noErr) unless an error occurs. You're confusing noErr
  827. > with FALSE, both of which are equal to zero.
  828.  
  829. Sigh - wrong.  More dangerous misinformation.  It only took me 45
  830. seconds to pull my Inside Mac off the shelf and find GetNextEvent.
  831. You'd think someone would do that before sending a netnews message
  832. to tens of thousands of people on thousands of computers...
  833.  
  834. Ahem:
  835.  
  836. "Before reporting an event to your application, GetNextEvent first
  837.  calls the Desk Manager function SystemEvent to see whether the system
  838.  wants to intercept and respond to the event.  If so, or if the event
  839.  being reported is a null event, GetNextEvent returns a function result
  840.  of FALSE; a function result of TRUE means that your application should
  841.  handle the event itself."
  842.  
  843. Now, the Desk Manager clause is not as important as it once was.
  844. Since DAs are run in their own layers in system 7 and in a unified
  845. DA layer in system 6 with multifinder, the only time this can make
  846. a difference is on system 6 without multifinder, or system 6 with
  847. multifinder and a DA loaded into the application's heap using the
  848. option key while opening the DA.
  849.  
  850. Modulo this, the result from GetNextEvent is FALSE if a null event
  851. is being reported and TRUE if a real event is being returned.  It
  852. is NOT an error code...
  853.  
  854. And this is what I put in my private email to the original poster.
  855.  
  856. zben@ni.umd.edu     -KA3ZDF
  857.  
  858. ---------------------------
  859.  
  860. From: Paul.L.Merchant.Jr.@dartmouth.edu (Paul L Merchant Jr.)
  861. Subject: little sys 7 pop up problem (popupMenuCDEFProc)
  862. Date: 1 Sep 92 18:57:48 GMT
  863. Organization: Dartmouth College, Hanover, NH
  864.  
  865. In article <zocca-250892113905@jozef.amc.uva.nl>
  866. zocca@amc.uva.nl (Vincent Zocca) writes:
  867.  
  868. > tracked properly by TrackControl. That is, the control is inverted to show
  869. > itUs being tracked but the menu doesnUt actually pop up.
  870.  
  871.  
  872. I had this problem when I first used popup menus:  Make sure you're
  873. setting the actionProc field of the control to -1.  This will cause the
  874. default action procedure to be used and will make TrackControl work
  875. properly.
  876.  
  877. - -- Paul Merchant
  878. DCIS
  879.  
  880. +++++++++++++++++++++++++++
  881.  
  882. From: Michael Brennan <mikeb@sam.amgen.com>
  883. Organization: Amgen
  884. Date: Wed, 2 Sep 1992 22:01:07 GMT
  885.  
  886. In article <zocca-250892113905@jozef.amc.uva.nl> Vincent Zocca,
  887. zocca@amc.uva.nl writes:
  888. >So, I've got this problem with system 7's Pop-Up controls.
  889. >I create one with NewControl and popupMenuCDEFProc (IM VI 3-16). That
  890. works
  891. >fine; The control is displayed and the value (selection of a menu item)
  892. and
  893. >hilite status can be set. The 'only' thing is that the control is not
  894. >tracked properly by TrackControl. 
  895.  
  896. This is a common problem.  When you call TrackControl, be sure to use -1L
  897. as your final parameter (e.g., TrackControl( theControl, localPt,
  898. (ProcPtr) -1L )).  If you are using 0 for the final parameter, than this
  899. is why it is not working for you.  The -1L indicates that the CDEF
  900. employs a custom tracking procedure.  Be sure to cast it as a ProcPtr to
  901. keep the compiler happy!
  902.  
  903. ---------------------------
  904.  
  905. From: peter@cujo.curtin.edu.au (Peter N Lewis)
  906. Subject: TN 306 GetIconSuite glue fatal error
  907. Date: 2 Sep 92 04:30:46 GMT
  908. Organization: NCRPDA, Curtin University
  909.  
  910. Hi All,
  911.  
  912. I just came across this in TN 306:
  913.  
  914. In the body:
  915.  
  916. Function GetIconSuite(    Var theSuite: Handle; theID:Integer;
  917.         theSelector:Longint):OSErr;
  918.  
  919. In the interface:
  920.  
  921. FUNCTION GetIconSuite(VAR theIconSuite: Handle;theResID: INTEGER;
  922.     selector: Integer): OSErr;    INLINE    $303C, $0501, $ABC9;
  923.  
  924. pascal OSErr GetIconSuite(Handle *theIconSuite,short theResID,short
  925. selector)= {0x303C, 0x0501, 0xABC9};    
  926.  
  927. Now, look carefully at the selector ... oooops!
  928.  
  929. Its suppose to be a LongInt/long, not an integer/short!  The same most
  930. probabbly applies to ForEachIconDo's selector but I haven't checked it. 
  931. Its clear it has to be a long, since the svAllMiniData constant that can be
  932. passed is $00FF0000, certainly not a short value...
  933.  
  934. You have been warned,
  935.    Peter.
  936.  
  937. _______________________________________________________________________
  938. Peter N Lewis, NCRPDA, Curtin University       peter@cujo.curtin.edu.au
  939. GPO Box U1987, Perth WA 6001, AUSTRALIA             FAX: +61 9 367 8141
  940.  
  941. +++++++++++++++++++++++++++
  942.  
  943. From: Michael_Hecht@mac.sas.com (Michael Hecht)
  944. Date: 2 Sep 92 14:35:25 GMT
  945. Organization: SAS Institute Inc.
  946.  
  947. In article <peter-020992122411@134.7.50.3> Peter N Lewis,
  948. peter@cujo.curtin.edu.au writes:
  949. >Its suppose to be a LongInt/long, not an integer/short!  The same most
  950. >probabbly applies to ForEachIconDo's selector but I haven't checked it.
  951.  
  952. The same certainly does apply to ForEachIconDo.
  953.  
  954. Not only that, but the procedure definition for its action proc should be:
  955.  
  956. pascal OSErr DoIcons( ResType theType, Handle *theIconData,
  957.                 long refCon );
  958.  
  959. Note that the first two parameters are *reversed* in the Tech Note!
  960.  
  961. - --Michael
  962.  
  963. =======================================================================
  964. Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
  965. SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
  966.  
  967. +++++++++++++++++++++++++++
  968.  
  969. From: blob@Apple.COM (Brian Bechtel)
  970. Date: 4 Sep 92 13:48:25 GMT
  971. Organization: Apple Computer Inc., Cupertino, CA
  972.  
  973. peter@cujo.curtin.edu.au (Peter N Lewis) writes:
  974.  
  975. >I just came across this in TN 306:
  976.  
  977. >In the body:
  978.  
  979. >Function GetIconSuite(    Var theSuite: Handle; theID:Integer;
  980. >        theSelector:Longint):OSErr;
  981.  
  982. >In the interface:
  983.  
  984. >FUNCTION GetIconSuite(VAR theIconSuite: Handle;theResID: INTEGER;
  985. >    selector: Integer): OSErr;    INLINE    $303C, $0501, $ABC9;
  986.  
  987. >pascal OSErr GetIconSuite(Handle *theIconSuite,short theResID,short
  988. >selector)= {0x303C, 0x0501, 0xABC9};    
  989.  
  990. >Now, look carefully at the selector ... oooops!
  991.  
  992. >Its suppose to be a LongInt/long, not an integer/short!  The same most
  993. >probabbly applies to ForEachIconDo's selector but I haven't checked it. 
  994. >Its clear it has to be a long, since the svAllMiniData constant that can be
  995. >passed is $00FF0000, certainly not a short value...
  996.  
  997. This will be fixed in the October release of tech notes.  Thanks for
  998. reporting it!
  999.  
  1000. - --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  1001.  
  1002. ---------------------------
  1003.  
  1004. From: mhall@occs.cs.oberlin.edu (Matthew Hall)
  1005. Subject: Shareware Legality - Summary
  1006. Date: 2 Sep 92 20:18:55 GMT
  1007. Organization: Oberlin College Computer Science
  1008.  
  1009. Hello-
  1010.     Thank you all for your replies to my question - in brief I
  1011. released software to sumex-aim, asking to be contacted before it was
  1012. redistributed, and found out that NAUTILUS, against my wishes,
  1013. included it on their latest CD-ROM.  The answers I recieved were
  1014. widely varied ( only one of them told me that I was completely silly)
  1015. and there were at least 30 responses, on the net and by e-mail.  
  1016.  
  1017. As for what I should do now, the responses tended towards the line
  1018. that I had goofed.  A legal action was discouraged (I wasn't really
  1019. planning on a suit - that seemed a little much) as it would probably
  1020. cost more than I would gain.  I could ask them to remove my App from
  1021. their disk, but it is published now, and I doubt that they will recall
  1022. all the copies.  The damage is done, and the best course of action
  1023. seems to be a polite, firm letter telling them that they were at
  1024. fault. (Maybe the all of the other disenchanted folks that this
  1025. happened to and I can start a letter writing campaign.  Or heck - all
  1026. call to complain... collect. :-) )
  1027.  
  1028. To protect against these things, the first thing is to copyright your
  1029. program (I did). Put the copyright sign, date, and your name in your
  1030. programs About box, and in the documentation. This may give you all
  1031. the protection you need, but you should take the additional measures below.
  1032.  
  1033. Next, in the documentation, or README file, be very careful that you
  1034. use the correct wording if you don't want this to happen.  If you want
  1035. them to ask you beforehand, say something like "Any person or persons
  1036. wishing to redistribute this program for a profit MUST gain written
  1037. permission from me, the author, beforhand".  You can't be too explicit
  1038. here, and be very, very careful.  "Contact me" may be interpreted as
  1039. not needing permission, merely sending a letter to you.
  1040.  
  1041. (Other helpful lines - add one about "The author takes no liability
  1042. for damages..." so noone can take action against you if they think
  1043. your program fried their hard drive, and add one about "Redistributed
  1044. copies of this program must be distributed with all files, including
  1045. this one" so that if someone gets a copy second hand, they know
  1046. better)
  1047.  
  1048. Finally- Register your program with the library of congress.  The
  1049. person posting this suggestion, however, did not say explicitly how to
  1050. do this.  Perhaps someone could post instructions.
  1051.  
  1052. Oh yeah, MacTutor's latest version includes an article on software
  1053. authors rights.  Looks like I should get me a copy.
  1054.  
  1055. Thanks to everyone who responded.
  1056. - -matt hall
  1057.  
  1058. P.S.  I guess it was somewhat flattering to have my meager app
  1059. published on CD-ROM (I can tell my friends that I got put on CD this
  1060. summer) however, I did feel like my rights were violated here, and I
  1061. now know that I will have to be very careful in the future -
  1062. especially with the commercial version which I am publishing myself
  1063. and selling through catalogs.  Anyone who has suggestions for that, I
  1064. welcome your replies, and again will summarize.
  1065.  
  1066. - --
  1067.  
  1068.  
  1069. - -------------------------------------------------------------------------------
  1070. Matt Hall.    mhall@occs.cs.edu  OR  SMH9666@OBERLIN.BITNET
  1071.               (216)-775-5805 (That's a Cleveland Area code. Lucky Me)
  1072.  
  1073. "If a man comes up to you and says:
  1074.     'A dog just carried away your ear.'
  1075. Do you run after the dog, or search first for your ear?" - Moon over Morocco
  1076.   
  1077.  
  1078. +++++++++++++++++++++++++++
  1079.  
  1080. From: chuck@gte.com (Chuck Hoffman)
  1081. Date: 4 Sep 92 16:02:37 GMT
  1082. Organization: GTE Laboratories
  1083.  
  1084. In article <MHALL.92Sep2151855@occs.cs.oberlin.edu>,
  1085. mhall@occs.cs.oberlin.edu (Matthew Hall) wrote:
  1086. > Finally- Register your program with the library of congress.  The
  1087. > person posting this suggestion, however, did not say explicitly how to
  1088. > do this.  Perhaps someone could post instructions.
  1089.  
  1090. Just for background:  your copyright "declaration" is what you put on your
  1091. startup screen, etc., that says "Copyright 1992, Charles A. Hoffman.  All
  1092. rights reserved."  Your copyright "registration" is what you request from
  1093. the Library of Congress.  You are registering your copyright of your
  1094. program, you are not registering the program itself.
  1095.  
  1096. To register your copyright, call the Library of Congress at (202)707-9100
  1097. and request Form TX and instructions.  This is for copyrighting your source
  1098. code, which is treated as text.  Form PA is for works of art, in case you
  1099. want to copyright background pictures, etc.  I never have.
  1100.  
  1101. When you get the form, use the instructions to fill it out, and send it
  1102. back in with two copies of your source, and $20.  It's twenty, even though
  1103. some of the forms still say $10.  Some people say only one is required, but
  1104. that is for "hardship" which is more trouble than to just get a second copy
  1105. of the source.  Also some say only the first and last 50 pages, but that's
  1106. an old rule applying to OBJECT code, and I don't think it ever applied to
  1107. source.
  1108.  
  1109. In one to three months, you will receive back your registration form, with
  1110. the registration number stamped on it.
  1111.  
  1112. Questions about copyrights should be referred to an attorney, of course. 
  1113. The Library of Congress also maintains another number which has prerecorded
  1114. answers to common questions about copyrights.  It is (202)707-3000.
  1115.  
  1116. P.S.  Once you get a Form TX, you can copy it freely (holds down their
  1117. cost, they say).  It's not copyrighted!
  1118.  
  1119. Chuck Hoffman
  1120. chuck@gte.com
  1121. GTE Laboratories, Waltham, Massachusetts, USA
  1122. (617) 466-2131
  1123. =====================================
  1124. I'm not sure why we're here, but I am sure that while we're here we're
  1125. supposed to help each other.
  1126. =====================================
  1127.  
  1128. ---------------------------
  1129.  
  1130. From: de19@umail.umd.edu (Dan Emery)
  1131. Subject: Can TCL project size be reduced using precompiled headers?
  1132. Date: 2 Sep 92 21:39:37 GMT
  1133. Organization: UM Home for the Terminally Analytical
  1134.  
  1135. Is it possible to reduce the size of a TCP project file by using
  1136. the "precompiled header" feature?  If so, could some kind soul
  1137. email or post a description of the strategy one would use.
  1138.  
  1139. Dana Emery <de19@umail.umd.edu>
  1140.  
  1141. +++++++++++++++++++++++++++
  1142.  
  1143. From: mkelly@sisters.cs.uoregon.edu (Michael A. Kelly)
  1144. Organization: University of Oregon Computer and Information Sciences Dept.
  1145. Date: Thu, 3 Sep 1992 00:40:12 GMT
  1146.  
  1147. In article <de19-020992173616@zben-mac-ii.umd.edu> de19@umail.umd.edu (Dan Emery) writes:
  1148. >Is it possible to reduce the size of a TCP project file by using
  1149. >the "precompiled header" feature?  If so, could some kind soul
  1150. >email or post a description of the strategy one would use.
  1151. >
  1152.  
  1153. I'll add this to the next version of the FAQ.
  1154.  
  1155. The answer is yes.  You just add your TCL headers to Mac #includes.c and
  1156. Precompile.  Presumeably you would want to make a separate file, called
  1157. something like "Traps+TCL Headers".
  1158.  
  1159. Mike.
  1160. - -- 
  1161. _____________________________________________________________________________
  1162. Michael A. Kelly                                         University of Oregon
  1163. mkelly@cs.uoregon.edu                             Computer Science Department
  1164. _____________________________________________________________________________
  1165.  
  1166. +++++++++++++++++++++++++++
  1167.  
  1168. From: petrus@stacken.kth.se (Lars Petrus)
  1169. Organization: Stacken Computer Club, Stockholm, Sweden
  1170. Date: Thu, 3 Sep 1992 10:10:56 GMT
  1171.  
  1172. In article mkelly@sisters.cs.uoregon.edu (Michael A. Kelly) writes:
  1173. >In article de19@umail.umd.edu (Dan Emery) writes:
  1174. >>Is it possible to reduce the size of a TCP project file by using
  1175. >>the "precompiled header" feature?  If so, could some kind soul
  1176. >>email or post a description of the strategy one would use.
  1177. >>
  1178. >
  1179. >I'll add this to the next version of the FAQ.
  1180. >
  1181. >The answer is yes.  You just add your TCL headers to Mac #includes.c and
  1182. >Precompile.  Presumeably you would want to make a separate file, called
  1183. >something like "Traps+TCL Headers".
  1184.  
  1185.  
  1186.    There is a nasty trap in this. If you precompile your headers using
  1187. "Generate 68881 instructions", and then use them in a project which do
  1188. not use 68881 your program will work perfectly on your machine (which
  1189. has a 68881), but will crash on a machine without 68881.
  1190.  
  1191.    This caused our biggest panic to date (it was The Important Possible
  1192. Customer who had the FPU-less mac), and took two days and one night to
  1193. figure out.
  1194.  
  1195.  
  1196.  
  1197.    Precompiling headers is the first thing to do to reduce project size.
  1198. It chopped 75% of mine. If you are still not satisfied, you can turn of
  1199. debugging on files where you don't think you need it. That's the grey
  1200. dot to the left of file name.
  1201.  
  1202.  
  1203.  
  1204.   -  -  -  -
  1205. Wise Quote: "You want to know how to paint a perfect painting? It's easy. 
  1206. Make yourself perfect and then just paint naturally. That's the way all the 
  1207. experts do it." - Robert M Pirsig in ZATAOMM.
  1208.  
  1209. Lars Petrus, Solna, Sweden  -  petrus@stacken.kth.se
  1210.  
  1211. +++++++++++++++++++++++++++
  1212.  
  1213. From: Andrew Gilmartin <Andrew_Gilmartin@Brown.Edu>
  1214. Date: 3 Sep 1992 14:07:17 GMT
  1215. Organization: Brown University
  1216.  
  1217. In article <de19-020992173616@zben-mac-ii.umd.edu> Dan Emery,
  1218. de19@umail.umd.edu writes:
  1219.  
  1220. >Is it possible to reduce the size of a TCP project file by
  1221. using
  1222. >the "precompiled header" feature?  If so, could some kind soul
  1223. >email or post a description of the strategy one would use.
  1224.  
  1225. The TCL-Talk archive at ftp.brown.edu:/pub/tcl/misc has a TCL
  1226. header file that I use for debugging. Using this header my
  1227. projects are 50-60% smaller.
  1228.  
  1229. - --
  1230. Andrew Gilmartin
  1231. Computing & Information Services
  1232. Brown University
  1233.  
  1234. Andrew_Gilmartin@Brown.Edu
  1235.  
  1236. ---------------------------
  1237.  
  1238. End of C.S.M.P. Digest
  1239. **********************
  1240.